package com.qctpos.crm.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qctpos.crm.domain.dto.DemoListDto;
import com.qctpos.crm.domain.dto.PagerQueryDto;
import com.qctpos.crm.domain.entity.Demo1;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.LinkedHashMap;
import java.util.List;

@Mapper
public interface Demo1Mapper extends BaseMapper<Demo1> {


    @Select("select d1.* from demo1 d1 inner join demo2 d2 on d1.facilitator_id = d2.id ${ew.customSqlSegment}")
    IPage<Demo1> findPage(IPage<Demo1> page, @Param(Constants.WRAPPER) Wrapper<Demo1> queryWrapper);

    IPage<DemoListDto> selectDemo1PagerList(@Param("pg") Page<DemoListDto> page, @Param("ps") PagerQueryDto para);


    List<LinkedHashMap<String, Object>> superManagerSelect(String sql);

}
